package com.superb.system.service.impl;

import com.superb.common.database.mybatis.service.impl.SuperbServiceImpl;
import com.superb.common.security.entity.SuperbUser;
import com.superb.common.security.utils.SuperbUtils;
import com.superb.common.utils.HeardersUtils;
import com.superb.common.utils.StringUtils;
import com.superb.system.api.entity.SystemRole;
import com.superb.system.mapper.SystemRoleMapper;
import com.superb.system.service.SystemRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 系统角色表;(system_role)表服务实现类
 * @Author: ajie
 * @CreateTime: 2024-5-15
 */
@Service
public class SystemRoleServiceImpl extends SuperbServiceImpl<SystemRoleMapper, SystemRole> implements SystemRoleService {
    @Override
    public List<String> listByUserId(String userId) {
        String list = baseMapper.listByUserId(userId, HeardersUtils.getOrganizetionId());
        return List.of(list.split(","));
    }

}